package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.OkrStar;
import com.ruoyi.system.domain.UserStar;
import com.ruoyi.system.mapper.OkrStarMapper;
import com.ruoyi.system.service.IOkrStarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Bruce on 2021/9/11 20:50
 **/
@Service
public class OkrStarServiceImpl implements IOkrStarService {
    @Autowired
    private OkrStarMapper okrStarMapper;

    @Override
    public int addStarUser(Long userId, Long starUserId) {
        return okrStarMapper.addStarUser(userId, starUserId);
    }

    @Override
    public int cancelStarUser(UserStar userStar) {
        return okrStarMapper.cancelStarUser(userStar);
    }

    @Override
    public int isStar(UserStar userStar) {
        return okrStarMapper.isStar(userStar);
    }

    @Override
    public List<UserStar> queryMyStarUsers(Long userId) {
        return okrStarMapper.queryMyStarUsers(userId);
    }

    @Override
    public int isOkrStar(OkrStar okrStar) {
        return okrStarMapper.isOkrStar(okrStar);
    }

    @Override
    public List<OkrStar> queryMyStarOkrs(Long userId) {
        return okrStarMapper.queryMyStarOkrs(userId);
    }

    @Override
    public int addStarOkr(Long okrId, Long userId) {
        return okrStarMapper.addStarOkr(okrId, userId);
    }

    @Override
    public int cancelStarOkr(OkrStar okrStar) {
        return okrStarMapper.cancelStarOkr(okrStar);
    }
}
